<ion-view view-title="{{room.name}}" class="chat-view" hide-tabs="true">
    <ion-header-bar align-title="center" class="bar-dark bar-header-black">
        <div class="buttons">
            <button class="button button-icon icon ion-arrow-left-c" ng-click="back()"></button>
        </div>
        <div class="title">{{room.name}}</div>
        <div class="buttons"><!--
            <button class="button button-icon icon" ng-class="{false: 'ion-ios-play-outline', true: 'ion-ios-play'}[isGameBegin]"
                    ng-click="handUp()" ng-if="user.id"></button>-->
            <button class="button button-icon icon"
                    ng-click="updateStatus()" ng-if="user && user.userId=='admin'">
               <!--  <span ng-show="room.type =='G011'">开始</span>
                <span ng-show="room.type =='G04'"></span> -->
                <!-- <span>{{config_lhl_stop_or_start == 2 ? '停止押注' : '开始押注'}}</span> -->
            </button>
            <button class="button button-icon icon ion-navicon" ng-click="openRoomMenu($event)"
                    ng-disabled="user == null || user.id == null || user.id == undefined"></button>
        </div>
    </ion-header-bar>
    <div class="has-header room-alert-wrapper" ng-show="alert.content"
         ng-class="{'room-alert-active': alert.active, '': !alert.active, 'room-alert-hide': alert.hide}">
        <div class="room-alert">
            <span ng-bind="alert.content"></span>
        </div>
    </div>
   
     
    <div class="room-pwd-mask" ng-if="pwdInput"></div>
    <div class="room-menu-mask" ng-click="closeRoomMenu()" ng-style="menuMaskStyle">
        <div class="room-menu" ng-style="menuStyle">
            <ul>
                <li class="room-menu-item" ng-click="gotoAccount()">
                    <i class="ion-person room-menu-icon"></i>我的账户<span style="font-size:11px">(<span style="color:greenyellow">微币</span>
                    <span style="color:red">{{balance ? balance : '...'}}</span>)</span>
                </li>
                <li class="room-menu-item" ng-click="openMembersModal()">
                    <i class="ion-person-stalker room-menu-icon"></i>成员列表
                </li>
                <li class="room-menu-item" ng-click="openDescModal()">
                    <i class="ion-ios-game-controller-b room-menu-icon"></i>游戏说明
                </li>
                <li class="room-menu-item" ng-click="openNumDetialModal()">
                    <i class="ion-ios-game-controller-b room-menu-icon"></i>历史开奖
                </li>
            </ul>
        </div>
    </div>
    <!--<ion-scroll></ion-scroll>-->
     <div style='position: fixed; width:100%;height:40px;z-index:99;top:40px;'>
       		<div>
       		 第{{qishu}} 期  {{numdetail }}	距离封盘{{lhhMin}}:{{lhhSeccon}}  开：{{lhhType}}
       		</div>
       		<div>金币：{{3385}}  id:3541</div>
       		<div><span>历史开奖记录</span><span>邀请好友</span><span>游戏规则</span></div>
       </div>
    <ion-content class="chat-content" ng-class="{'kb-open': emojiOpen}" delegate-handle="mainScroll"
                 overflow-scroll="false" on-scroll-complete="scrollComplete()" on-hold="onHold()"
                 on-release="onRelease()">
                
        <ion-refresher on-refresh="loadMoreMessages()" paging="false"></ion-refresher>
       <!--  <audio autoplay="autoplay" id='audio' controls="controls" loop="loop" preload="auto" src="../img/home2/bgmusic.mp3"> -->
       <!-- <audio autoplay="autoplay" id='audio' style='display:none'  controls="controls" loop="loop" preload="auto" src="../img/home2/bgmusic.mp3"></audio>-->
       
       
        <ion-list>
       
            <ion-item ng-repeat="item in visibleMessages" class="item-borderless chat-item"
                      ng-class="{'item-avatar':item.showAvatar&&item.align=='left','item-avatar-right':item.showAvatar&&item.align=='right'}">
               <!--   -->
			</audio>
                <img ng-src="{{item.headImg}}" ng-if="item.showAvatar" ng-click="openPopover($event, item)">
                <span class="chat-triangle-left" ng-if="item.align=='left'"
                      ng-class="{'lottery':item.lottery, 'yellow-bg': item.sender>0, 'red-bg':item.sender==0}"></span>
                <div align="{{item.align}}">
                    <div class="chat-item-nick" ng-show="item.align=='left'"
                         ng-class="{'room-owner': room.owner == item.sender}">
                        <span ng-show="room.owner == item.sender">(房主)</span>
                        <span>{{item.nickName}}</span>
                    </div>
                    <div class="chat-item-text {{item.style}}" ng-if="!item.lottery"
                         ng-bind-html="item.content|trustHtml"></div>
                    <div class="chat-item-lottery" ng-if="item.lottery"
                         ng-class="{true:'yellow-bg', false:'red-bg'}[item.sender>0]"
                         ng-click="openLottery(item.content.id, $event)">
                        <div class="lottery-up">
                            <img src="img/lottery/lottery.png" class="lottery-img {{item.style}}">
                            <div class="lottery-content {{item.style}}">
                                <div ng-class="{0: 'room-menu-icon'}[item.content.sender]">
                                    {{item.content.description?item.content.description:'恭喜发财,大吉大利!'}}
                                </div>
                                <div ng-show="item.content.type=='2'">游戏红包</div>
                                <div ng-show="item.content.type=='1'">福利红包</div>
                            </div>
                        </div>

                        <div class="lottery-down">
                            <div style="line-height: 30px; font-size: 14px; color: #808080; margin-left: 10px;">
                                {{appTitle}}
                            </div>
                        </div>
                    </div>
                </div>
                <span class="chat-triangle-right" ng-if="item.align=='right'" ng-class="{'lottery':item.lottery}"></span>
            </ion-item>
        </ion-list>
    </ion-content>
    <ion-footer-bar keyboard-attach ng-class="{'kb-open': emojiOpen}">
        <div class="buttons" style='    width: 100%;'>
           <!--  <button ng-if="user && user.userId=='admin'" class="button button-icon icon ion-ios-plus-outline" ng-click="openModal2($event)">
            </button>  -->
            <button class="button button-touzhu" style='margin-left: 40%;' ng-click="openModal($event)" ng-class="{'disabled': touzhuState.betting}"></button>
        </div>
      <!--   <div class="title msg-input" style="right: 40px; left: 33px;}">
            <input id="chatMsgInput" class="chat-input" ng-model="content" ng-click="closeEmojiBoard($event)"
                   ng-keydown="keyEnter($event)">
        </div> -->
        <!-- <div class="buttons">
            <button class="button button-icon icon ion-happy-outline" ng-click="toggleEmojiBoard()"
            ng-disabled="user.id == null || user.id == undefined"></button>
            <button class="button button-icon icon ion-paper-airplane" ng-click="send()"></button>
        </div> -->
    </ion-footer-bar>
    <!--<div class="emoji-board" ng-class="{'kb-close': !emojiOpen}">-->
    <!--<i class="emoji" ng-repeat="emoji in emojiList" ng-bind="emoji" ng-click="insertEmoji(emoji)"></i>-->
    <!--</div>-->
</ion-view>
